{include file="header"}
<div style="padding: 20px;">
<div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
  <ul class="layui-tab-title">
    <a href="/admin.php/muban/index.html"><li>本地模板</li></a>
    <a href="/admin.php/muban/zaixian.html"><li class="layui-this">在线模板</li></a>
  </ul>
  <div class="layui-tab-content"></div>
</div> 
<style>.yanse {
	background-color: #03A9F4;
	color: #fff;
}
div.img {
	border: 1px solid #ccc;
	border: 10px solid #f6f6f6;
	border-radius: 5px;
	transition: all .2s;
	-webkit-transition: all .2s;
}
div.img: hover {
	border-radius: 20px;
	border: 10px solid #e5e5e5;
	animation: myfirst 2s;
	-webkit-animation: myfirst 2s;
	Safari and Chrome
}
@keyframes myfirst {
	from {
	border: 10px solid #e5e5e5;
}
to {
	border: 10px solid #4dbdef;
}
}@-webkit-keyframes myfirst 
Safari and Chrome
	 {
	from {
	border: 10px solid #e5e5e5;
}
to {
	border: 10px solid #4dbdef;
}
}div.img img {
	width: 80%;
	height: 200px;
	box-shadow: 0 0 10px #393d49;
	margin-top: 10px;
	border-radius: 10px;
}
div.desc {
	white-space: nowrap;
	overflow: hidden;
	text-overflow : ellipsis;
	padding: 10px;
	text-align: center
}
* {
	box-sizing: border-box
}
.responsive {
	padding: 10px 6px;
	float: left;
	width: 24.99999%
}
@media only screen and (max-width: 700px) {
	.responsive {
	width: 100%;
	margin: 6px 0
}
div.img img {
	width: 80%;
	height: 150px;
}
}.clearfix: after {
	content: "";
	display: table;
	clear: both
}
</style>
 <a style="margin-left:32px;" href="/admin.php/muban/zaixian.html" class="layui-btn layui-btn-primary {if $or eq 1|| $or eq ''} yanse{/if}">PC模板</a>  
 <a href="/admin.php/muban/zaixian.html?or=2" class="layui-btn layui-btn-primary {if $or eq 2} yanse{/if}">手机模板</a> 
 {if $or eq 1|| $or eq ''}
<div style="padding:20px;">
{volist name=":mymuban_pc()" id="vo"}
<div class="responsive"><div class="img" align="center"> 
<a href="http://www.115cms.com/s_dow_{$vo.id}.html" target="_blank">
<img src="{$vo.pic}" alt="{$vo.title}" width="300" height="200"><div class="desc">{$vo.title} - V{$vo.banben}</div> 
</a>
<div class="desc">价格 - ￥{$vo.jifen}元</div>
   <div class="desc"> 
 <button class="layui-btn layui-btn-normal layui-btn-fluid shezhi"  lay-submit="" url="/admin.php/muban/xiazai.html?info={$vo.biaoshi}&id={$vo.id}" lay-submit lay-filter="xiazai">下载</button>
      </div>
    
  </div>
</div>
{/volist}
</div> 
 {/if}
 {if $or eq 2}
<div style="padding:20px;">
{volist name=":mymuban_wap()" id="vo"}
<div class="responsive"><div class="img" align="center"> 
<a href="http://www.115cms.com/s_dow_{$vo.id}.html" target="_blank">
<img src="{$vo.pic}" alt="{$vo.title}" width="300" height="200"><div class="desc">{$vo.title} - V{$vo.banben}</div> 
</a>
<div class="desc">价格 - ￥{$vo.jifen}元</div>
   <div class="desc"> 
 <button class="layui-btn layui-btn-normal layui-btn-fluid shezhi"  lay-submit="" url="/admin.php/muban/xiazaiw.html?info={$vo.biaoshi}&id={$vo.id}" lay-submit lay-filter="xiazai">下载</button>
      </div>
    
  </div>
</div>
{/volist}
</div> 
  {/if} 
 <script>
layui.use('form',function(){
  var form = layui.form
  ,jq = layui.jquery;
  form.on('submit(xiazai)', function(data){
  	var url = jq(this).attr('url');
    var param = data.field;
        layer.confirm('确定要下载吗？下载后将会覆盖原来的文件', function(data) {
            loading = layer.load(20, {
                shade: [0.2, '#000']
            });
    jq.post(url,param,function(data){
        layer.close(loading);
      if(data.code == 200){
        layer.close(loading);
        var downurl=data.path;
        layer.msg(data.msg, {icon: 1, time: 1000}, function(){
        location.href = '/admin.php/muban/ad.html';
        });
      }else{
        layer.close(loading);
        layer.msg(data.msg, {anim: 6, time: 1000});
        var downurl=data.path;
        window.open(''+downurl+'','_blank');
      }
        
    });
    
   });
    return false;
  });
})
</script>
</div>
{include file="footer"}